package org.dm.utils
{
	import org.dm.utils.List;
	
	public class Queue
	{
		private var _list:List = new List();
		
		public function Queue()
		{
		}
		
		public function get lenth():int
		{
			return _list.length;
		}
		
		public function empty():Boolean
		{
			return _list.empty();
		}
		
		public function clear():void
		{
			_list.clear();
		}
		
		public function push(data:*):void
		{
			_list.push_back(data);
		}
		
		public function pop():*
		{
			if(_list.empty())
			{
				return null;
			}
			
			var data:* = _list.front;
			_list.pop_front();
			return data;
		}

	}
}